package it.agm.fanta.activity;

import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;

import it.agm.fanta.FantaserviceApp;
import it.agm.fanta.FantaserviceApp.TrackerName;
import it.agm.fanta.R;
import it.agm.fanta.activity.fragment.TabsPagerAdapter;
import android.app.ActionBar;
import android.app.ActionBar.TabListener;
import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
//import android.support.v7.app.ActionBar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class LiveActivity extends FragmentActivity implements
ActionBar.TabListener {
	private String[] tabs = { "Top Rated", "Games", "Movies" };
	ViewPager mViewPager;
	private TabsPagerAdapter mAdapter;
	 private android.app.ActionBar actionBar;
	
	
	public LiveActivity() {

	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_live);
        Tracker t = ((FantaserviceApp) getApplication()).getTracker(TrackerName.APP_TRACKER);
        t.setScreenName("Live");
        t.send(new HitBuilders.AppViewBuilder().build());
		actionBar = getActionBar();
		actionBar.setHomeButtonEnabled(false);
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);  
        for (String tab_name : tabs) {
            actionBar.addTab(actionBar.newTab().setText(tab_name)
                    .setTabListener(this));
        }
		
	}


	

	@Override
	public void onTabSelected(android.app.ActionBar.Tab tab,
			android.app.FragmentTransaction ft) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onTabUnselected(android.app.ActionBar.Tab tab,
			android.app.FragmentTransaction ft) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onTabReselected(android.app.ActionBar.Tab tab,
			android.app.FragmentTransaction ft) {
		// TODO Auto-generated method stub
		
	}
}
